<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=\, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        mounted() {
			const script = document.createElement('script');
			script.type='text/javascript'
			script.src = 'https://static.yxuer.com/MathJax-2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
			
			script.onload = () => {
				console.log('Script loaded successfully.');		
					this.initMath()
					window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub])
			};
			document.head.appendChild(script)
			this.setdiv()
			this.updata()	
		 },

         initMath() {
            window.MathJax.Hub.Config({
                tex2jax: {
                  inlineMath: [['$', '$'], ['\\(', '\\)']],
                  displayMath: [
                    ["$$", "$$"],
                    ["\\[", "\\]"]
                ], //段内公式选择符
                skipTags:[
                    "script",
                    "noscript",
                    "style",
                    "textarea",
                    "pre",
                    "code",
                    "a"
                ]
                },
                svg: {
                  fontCache: 'global'
                }
             });
        },

        updataMath() {
            window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub])
       },

        /* 通知渲染数学公式 */
			 noticeRenderMath() {
				this.renderMath = true
			 },



    </script>
    
</body>
</html>